package com.huirui.server.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huirui.server.constant.ProductStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Schema(description = "商品视图对象，用于展示商品基本信息")
public class ProductVo {

    @Schema(description = "商品唯一标识", example = "1")
    private Long id;

    @Schema(description = "商品名称", example = "麦迪康 一次性使用灭菌橡胶外科手套")
    private String productName;

    @Schema(description = "商品价格", example = "99.90")
    private Double price;

    @Schema(description = "商品图片url")
    private String image;

    @Schema(description = "总销量")
    private Long totalSales;

    @Schema(description = "状态")
    private ProductStatus status;

    @Schema(description = "权重")
    private Long sort;

    @Schema(description = "商品类型")
    private Integer productType;

    @Schema(description = "添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @Schema(description = "总库存")
    private Long stock;
}
